<extend name="Shops:layout" />
<block name="content">
    <div class="wst-body"> 
       <div class='wst-page-header'>卖家中心 > 物流管理</div>
       <div class='wst-page-content'>
        <!--<div class='wst-tbar-group' style='text-align:right'>
        	<span></span>
           <a href='{:U("Home/Express/toEdit")}'><span class='add btn'></span>新增</a>&nbsp;
        </div>-->
        <table class='wst-list'>
           <thead>
             <tr>
               <th width='40'>序号</th>
               <th>物流名称</th>
               <th>查询电话</th>
               <th>官方网址</th>
               <th width='100' style="line-height: normal;">启用状态<br/><span style="font-weight:normal;color:red;">(双击可修改)</span></th>
               <th width='150'>操作</th>
             </tr>
           </thead>
           <tbody>
            <volist name="List['root']" id="vo" key='i'>
             <tr>
               <td>{$i}</td>
               <td>{$vo['expressCompany']}</td>
               <td>{$vo['telephone']}</td>
               <td>{$vo['website']}</td>
               <if condition="$vo['parentId'] neq 0 && $vo['isShow'] neq 0 ">
                  <td style="cursor:pointer;" ondblclick="changeExpressStatus(0,{$vo['id']},{$vo['parentId']})"><span class='wst-state_yes'></span></td>
               <else/>
                    <td style="cursor:pointer;" ondblclick="changeExpressStatus(1,{$vo['id']},{$vo['parentId']})"><span class='wst-state_no'></span></td>
              </if>
               <td>
               <if condition="$vo['parentId'] neq 0">
               <a href="{:U('Home/Express/toEdit',array('id'=>$vo['id']))}" class='btn edit' title='编辑'></a>
               <a href="javascript:delExpress({$vo['id']})" class='btn del' title='删除'></a>
               &nbsp;
               <else />
                平台提供
               </if>
               </td>
             </tr>
             </volist>
             <tfoot>
             <tr>
                <td colspan='12'>
                <div class="wst-page" style="float:right;padding-bottom:10px;">
            <div id="wst-page-items"></div>
        </div>
                <script>
          <if condition="$List['totalPage'] gt 1">
          $(document).ready(function(){
          laypage({
              cont: 'wst-page-items',
              pages: {$List['totalPage']}, //总页数
              skip: true, //是否开启跳页
              skin: '#e23e3d',
              groups: 3, //连续显示分页数
              curr: function(){ //通过url获取当前页，也可以同上（pages）方式获取
                  var page = location.search.match(/p=(\d+)/);
                  return page ? page[1] : 1;
              }(), 
              jump: function(e, first){ //触发分页后的回调
                  if(!first){ //一定要加此判断，否则初始时会无限刷新
                    var nuewurl = WST.splitURL("p");
                    var ulist = nuewurl.split("?");
                    if(ulist.length>1){
                      location.href = nuewurl+'&p='+e.curr;
                    }else{
                      location.href = '?p='+e.curr;
                    }
                      
                  }
              }
          });
          });
        </if>
        </script>
                </td>
             </tr>
             </tfoot>
           </tbody>
        </table>
        <!--<div class='wst-tbar-group' style='text-align:right'>
        	<span></span>
           <a href='{:U("Home/Express/toEdit",array("umark"=>"express"))}'><span class='add btn'></span>新增</a>&nbsp;
        </div>-->
        </div>
    </div>
</block> 